#pragma once

#include "DrawElement.h"

class PFMEngine;

class TextElement : public DrawElement
{
	friend class PFMEngine;
public:
	void				SetPos(int nPosX, int nPosY)		{ m_nPosX = nPosX; m_nPosY = nPosY; }
	//void				SetSize(int nWidth, int nHeight)	{  }
	void				SetText(const char* pText)			{ m_strText = pText; }
	void				SetColor(D3DXCOLOR dwColor)			{ m_dwColor = dwColor; }
	void				SetShadowOffset(int nOffset)		{ m_nShadowOffset = nOffset; }

private:
	TextElement();
	virtual ~TextElement();

	void				Create(LPD3DXFONT pFont, D3DXCOLOR dwColor, int nShadowOffset);
	virtual void		Draw(LPDIRECT3DDEVICE9 pd3dDevice);

private:	
	int					m_nPosX;
	int					m_nPosY;
	//int					m_nWidth;
	//int					m_nHeight;
	D3DXCOLOR			m_dwColor;
	int					m_nShadowOffset;
	std::string			m_strText;

	LPD3DXFONT			m_pFont;
};